import numpy as np
import cv2

img = np.zeros((480,680,3),np.uint8)
print(img[100,100])

# 检索某个像素点
# count = 0
# while count < 200:
#     img[count,100] = 255
#     count += 1

# 获取子矩阵
roi = img[100:300,100:400]
roi[:,:] = [0,255,255]
roi[10:100,10:100] = [0,255,0]


# cv2.imshow('img',img)
cv2.imshow('img',roi)
key = cv2.waitKey(0)
if key & 0xFF == ord('q'):
    cv2.destroyAllWindows()
